package fr.bugtracker.bean.security;

import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerFactory;

import fr.bugtracker.bean.security.DefaultExceptionHandler;


/**
 * Factory pour la capture de l'évènement ViewExpiredException
 * @author l.parrot1
 */
public class DefaultExceptionHandlerFactory extends ExceptionHandlerFactory {

	/**
	 *
	 */
	private ExceptionHandlerFactory parent;

	/**
	 * Constructeur de la classe <code>DefaultExceptionHandlerFactory</code>.
	 * @param parent {@link ExceptionHandlerFactory}
	 */
	public DefaultExceptionHandlerFactory(ExceptionHandlerFactory parent) {
		this.parent = parent;
	}

	@Override
	public ExceptionHandler getExceptionHandler() {
		ExceptionHandler eh = parent.getExceptionHandler();
		eh = new DefaultExceptionHandler(eh);

		return eh;
	}

}
